﻿using System;
using System.Collections.Generic;
namespace CoreSoft.Frame.Entity
{

    [Serializable]
    /// <summary>
    /// 采购入库单明细表（红蓝字） 
    /// 数据表:rdrecords01
    /// </summary>
    public class Rdrecords01
    {
        #region 构造函数
        public Rdrecords01()
        {
        }
        #endregion
        
        #region 表字段
        /// <summary>
        /// 主键
        /// </summary>
        public String Id
        {
            get;
            set;
        }
        
        /// <summary>
        /// 入库行号
        /// </summary>
        public Int32 RdSeq
        {
            get;
            set;
        }
        
        /// <summary>
        /// 入库单号
        /// </summary>
        public String RdCode
        {
            get;
            set;
        }
        
        /// <summary>
        /// IQC批次明细ID
        /// </summary>
        public String IQCBatchDetailID
        {
            get;
            set;
        }
        
        /// <summary>
        /// ERP采购订单号
        /// </summary>
        public String PoCode
        {
            get;
            set;
        }
        
        /// <summary>
        /// ERP采购订单行号
        /// </summary>
        public Int32? PoSeq
        {
            get;
            set;
        }
        
        /// <summary>
        /// ERP到货单号
        /// </summary>
        public String ArrCode
        {
            get;
            set;
        }
        
        /// <summary>
        /// ERP到货行号
        /// </summary>
        public Int32? ArrSeq
        {
            get;
            set;
        }
        
        /// <summary>
        /// ERP采购订单ID
        /// </summary>
        public Int32? PoID
        {
            get;
            set;
        }
        
        /// <summary>
        /// ERP采购订单明细ID
        /// </summary>
        public Int32? PoDID
        {
            get;
            set;
        }
        
        /// <summary>
        /// ERP到货单明细ID
        /// </summary>
        public Int32? ArrDID
        {
            get;
            set;
        }
        
        /// <summary>
        /// 收料单ID
        /// </summary>
        public String ArrDetailDID
        {
            get;
            set;
        }
        
        /// <summary>
        /// 存货编码
        /// </summary>
        public String   CinvCode
        {
            get;
            set;
        }
        
        /// <summary>
        /// 货位编号
        /// </summary>
        public String PositionCode
        {
            get;
            set;
        }
        
        /// <summary>
        /// 批次号
        /// </summary>
        public String BatchCode
        {
            get;
            set;
        }
        
        /// <summary>
        /// 币种
        /// </summary>
        public String Bz
        {
            get;
            set;
        }
        
        /// <summary>
        /// 汇率
        /// </summary>
        public Single? ExchangeRate
        {
            get;
            set;
        }
        
        /// <summary>
        /// 税率
        /// </summary>
        public Single? TaxRate
        {
            get;
            set;
        }
        
        /// <summary>
        /// 原币单价
        /// </summary>
        public Decimal? OriPrice
        {
            get;
            set;
        }
        
        /// <summary>
        /// 原币含税单价
        /// </summary>
        public Decimal OriTaxPrice
        {
            get;
            set;
        }
        
        /// <summary>
        /// 原币金额
        /// </summary>
        public Decimal? IOriSum
        {
            get;
            set;
        }
        
        /// <summary>
        /// 原币价税合计
        /// </summary>
        public Decimal? IOriTaxSum
        {
            get;
            set;
        }
        
        /// <summary>
        /// 原币税额
        /// </summary>
        public Decimal? IOriTax
        {
            get;
            set;
        }
        
        /// <summary>
        /// 本币单价
        /// </summary>
        public Decimal? LocalPrice
        {
            get;
            set;
        }
        
        /// <summary>
        /// 本币含税单价
        /// </summary>
        public Decimal? LocalTaxPrice
        {
            get;
            set;
        }
        
        /// <summary>
        /// 本币金额
        /// </summary>
        public Decimal? ILocalSum
        {
            get;
            set;
        }
        
        /// <summary>
        /// 本币价税合计
        /// </summary>
        public Decimal? ILocalTaxSum
        {
            get;
            set;
        }
        
        /// <summary>
        /// 本币税额
        /// </summary>
        public Decimal? IlocalTax
        {
            get;
            set;
        }
        
        /// <summary>
        /// ERP返回入库单明细标识
        /// </summary>
        public Int32? U8RdDid
        {
            get;
            set;
        }
        
        /// <summary>
        /// 组织ID
        /// </summary>
        public String OrgID
        {
            get;
            set;
        }

        public String  PoRetDetailID { get; set; }

        public decimal InQty { get; set; }

        public String Free1 { get; set; }
        public String Free2 { get; set; }
        public String Free3 { get; set; }
        public String Free4 { get; set; }
        public String Free5 { get; set; }
        public String Free6 { get; set; }
        public String Free7 { get; set; }
        public String Free8 { get; set; }
        public String Free9 { get; set; }
        public String Free10 { get; set; }

        public string UnitName { get; set; }
        #endregion
        #region 验证字段是否可以为空
        public List<string> Validation()
        {
            List<string> vMsgList=new List<string>();
            
                    if(Id==null){
                          vMsgList.Add("主键不可以为空！");
                    }
                    else{
                        if(Id.ToString().Trim()=="")
                        {
                              vMsgList.Add("主键不可以为空！");
                        }
                    }
                 
                    if(RdSeq==null){
                          vMsgList.Add("入库行号不可以为空！");
                    }
                    else{
                        if(RdSeq.ToString().Trim()=="")
                        {
                              vMsgList.Add("入库行号不可以为空！");
                        }
                    }
                 
                    if(RdCode==null){
                          vMsgList.Add("入库单号不可以为空！");
                    }
                    else{
                        if(RdCode.ToString().Trim()=="")
                        {
                              vMsgList.Add("入库单号不可以为空！");
                        }
                    }
                 
                    if(CinvCode==null){
                          vMsgList.Add("存货编码不可以为空！");
                    }
                    else{
                        if(CinvCode.ToString().Trim()=="")
                        {
                              vMsgList.Add("存货编码不可以为空！");
                        }
                    }
                 
                    if(OriTaxPrice==null){
                          vMsgList.Add("原币含税单价不可以为空！");
                    }
                    else{
                        if(OriTaxPrice.ToString().Trim()=="")
                        {
                              vMsgList.Add("原币含税单价不可以为空！");
                        }
                    }
                 
                    if(OrgID==null){
                          vMsgList.Add("组织ID不可以为空！");
                    }
                    else{
                        if(OrgID.ToString().Trim()=="")
                        {
                              vMsgList.Add("组织ID不可以为空！");
                        }
                    }
            if (InQty == null)
            {
                vMsgList.Add("入库数量不可以为空！");
            }
            else
            {
                if (InQty.ToString().Trim() == "")
                {
                    vMsgList.Add("入库数量不可以为空！");
                }
            }

            return vMsgList;
        }
        
        
        #endregion
    }
}